<template>
    <div>
      <home-header></home-header>
      <home-swiper :list="swiperList"></home-swiper>
      <home-icons :iconlist="iconList"></home-icons>
      <home-recommand :recommendlist="recommendList"></home-recommand>
      <home-weekend :weekendlist="weekendList"></home-weekend>
    </div>
</template>

<script>
import HomeHeader from './components/Header.vue'
import HomeSwiper from './components/Swiper.vue'
import HomeIcons from './components/Icons.vue'
import HomeRecommand from './components/Recommand.vue'
import HomeWeekend from './components/Weekend.vue'

import localhostData from '../../../static/textData/index.json'
export default {
  name: 'Home',
  components: {
    HomeHeader,
    HomeSwiper,
    HomeIcons,
    HomeRecommand,
    HomeWeekend
  },
  data () {
    return {
      swiperList: [],
      iconList: [],
      weekendList: [],
      recommendList: []
    }
  },
  mounted: function () {
    if (localhostData.ret && localhostData.data) {
      this.swiperList = localhostData.data.swiperList
      this.iconList = localhostData.data.iconList
      this.weekendList = localhostData.data.weekendList
      this.recommendList = localhostData.data.recommendList
    }
  },
  activated () {
    // 页面重新显示的会调用
    console.log('actived')
  },
  methods: {
    getHomeInfo () {
    },
    getHomeInfoSuccess (info) {
      console.log(info)
    }
  }
}
</script>

<style>
</style>
